﻿using System;
using System.Diagnostics.Contracts;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.OfficeArt
{
    abstract class OfficeArtStandardBlip: OfficeArtBlip
    {
        private byte tag;

        protected OfficeArtStandardBlip(byte[] data): base (data)
        {
            Contract.Assert(GetDigest() != null);
        }

        protected OfficeArtStandardBlip()
        {
        }

        protected override sealed int ReadRest(BinaryReader reader)
        {
            tag = reader.ReadByte();
            return 1;
        }
        protected override void WriteRest(BinaryWriter writer)
        {
            writer.Write(tag);
        }
        protected override sealed int RestByteLength
        {
            get { return 1; }
        }
    }
}